package org.nanhill.osgi.example.biz.impl;

import org.nanhill.osgi.example.biz.LoginValidator;
import org.nanhill.osgi.example.manager.AccountNotExist;
import org.nanhill.osgi.example.manager.UserManager;

public class ValidatorDB implements LoginValidator {

	private UserManager userManager;

	public void setUserManager(UserManager userManager) {
		this.userManager = userManager;
	}

	public void valide(String username, String pass) throws AccountNotExist {
		userManager.exist(username, pass);
	}

	@Override
	public String toString() {
		return "Validator DB:" + hashCode();
	}
}
